package com.xtourms.server.db.core;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.Configuration;

public class DBOper {
	
	private static Configuration cfg;
	private static SessionFactory sessionFactory;
	
	static{
		cfg = new AnnotationConfiguration().configure();
		sessionFactory = cfg.buildSessionFactory();
	}
	
	public static Session openSession(){
		Session s = sessionFactory.openSession();
		return s;
	}
}
